import static org.junit.jupiter.api.Assertions.assertEquals;

import java.io.IOException;

import org.junit.jupiter.api.Test;

//import test.MathExam6733;

class MathExam6733Test {

	@Test
	public void testCheckArgs_nullArgs() throws IOException {
		String[] args = {};
		new MathExam6733();
		assertEquals("请输入两个参数，第一个参数是题目数量，第二个参数是题目难度（1,2）,逗号隔开", MathExam6733.checkArgs(args));
	}

	@Test
	public void testCheckArgs_nullQuestion() throws IOException {
		String[] args = { "0", "1" };
		new MathExam6733();
		assertEquals("请输入题目数量!", MathExam6733.checkArgs(args));
	}

	@Test
	public void testCheckArgs_missGreade() throws IOException {
		String[] args = { "1", "0" };
		new MathExam6733();
		assertEquals("请输入（1或2）年级年级!", MathExam6733.checkArgs(args));
	}

	@Test
	public void testCheckArgs_notGreadeOne() throws IOException {
		String[] args = { "1", "3" };
		new MathExam6733();
		assertEquals( "请输入（1或2）年级年级!", MathExam6733.checkArgs(args));
	}

	@Test
	public void testCheckArgs_notGreadeTwo() throws IOException {
		String[] args = { "1", "4" };
		new MathExam6733();
		assertEquals( "请输入（1或2）年级年级!", MathExam6733.checkArgs(args));
	}

}
